package org.domus.sipnmove.useragent;

import javax.sip.RequestEvent;
import javax.sip.ResponseEvent;
import javax.sip.ServerTransaction;

/**
 * An autonomous call
 */
public interface Call {

	/**
	 * Add a call observer
	 * 
	 * @param newCallView
	 */
	public void addCallObserver(CallObserver callObserver);

	/**
	 * Terminate the call
	 */
	public void terminate();

	/**
	 * Initialize the session
	 * 
	 * @param toAddressString
	 */
	public void initiate(String toAddressString);

	/**
	 * Return the call id
	 */
	public String getCallId();

	/**
	 * Process a SIP Response event
	 * @param responseEvent
	 */
	public void processResponse(ResponseEvent responseEvent);

	/**
	 * Process a SIP Request event
	 * @param requestEvent
	 */
	public void processRequest(RequestEvent requestEvent, ServerTransaction st);
}
